package org.example.springioc.Interface;

import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 九转苍翎
 * Date: 2025/9/28
 * Time: 16:44
 */
public interface Func {
    void init();
}

@Service("dataBaseFunc")//设置Bean的名称为dataBaseFunc
class DataBaseFunc implements Func {
    @Override
    public void init(){
        System.out.println("database init");
    }
}

@Service("fileFunc")//设置Bean的名称为fileFunc
class FileFunc implements Func {
    @Override
    public void init(){
        System.out.println("file init");
    }
}
